package com.example.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

public class SelfFutureTask extends FutureTask<String> {

    /**
     * Creates a {@code FutureTask} that will, upon running, execute the
     * given {@code Callable}.
     *
     * @param callable the callable task
     * @throws NullPointerException if the callable is null
     */
    public SelfFutureTask(Callable<String> callable) {
        super(callable);
    }

    @Override
    protected void done() {
        System.out.println("SelfFutureTask done");
        super.done();
    }
}
